public class EqualsDemo{
	int int1;

public SomeClass obj1;

 
public EqualsDemo(int i, SomeClass o){
	int1=i;
	obj1=o;
}

public EqualsDemo(){
	this(0, new SomeClass());
}

public boolean equals (Object o){
	if(o == null) 
		return false;
	if(o == this) 
		return true;

	if(!(o instanceof EqualsDemo))
		return false;

	EqualsDemo other = (EqualsDemo)o; 

	if(!int1.equals(other.int1))
		return false;

	if(!obj1.equals(other.obj1))
		return false;

	return true;
	}
}
